/**
 * Created by mapbar_front on 2019/7/5.
 */
import React, { Component } from 'react';
// import target from './Utils';
import PubSub from 'wd-pub-sub';
export default class Ccom extends Component{
    constructor (props) {
        super(props);
        this.state = {
            aaa: ''
        }
    }
    componentDidMount () {
        // target.addHandler('message', (n) => {
        //     this.setState({
        //         aaa: n
        //     })
        // })
        PubSub.subscribe('message', (n) => {
            this.setState({
                aaa: n
            })
        })
    }
    render() {
        return <div>Ccom, {this.state.aaa}</div>
    }
}